<template>
  <div class="banner">
    <img class="banner-img" :src="img" alt="">
    <div class="banner-info">
      <div class="banner-title">{{name}}</div>
      <div class="banner-number"><span class="iconfont banner-icon">&#xe692;</span> 2</div>
    </div>
  </div>
</template>

<script>
export default {
  name: 'Banner',
  props: {
    img: String,
    name: String
  }
}
</script>

<style lang="stylus" scoped>
  .banner
    height 0
    overflow hidden
    padding-bottom 55%
    position relative
    .banner-img
      width 100%
    .banner-info
      position absolute
      top 90%
      width 100%
      color white
      clear both
      .banner-title
        float left
        margin-left .2rem
      .banner-number
        float left
        width 45%
        text-align right
</style>
